package com.example.security;

/**
 * @author zihong.zheng
 * @version 1.0
 * @date 2018/4/18
 * @time 22:32
 * @description
 */
public class CurrentUserHolder {

    private static final ThreadLocal<String> holder = new ThreadLocal<>();

    public static String get(){
        return holder.get()==null?"unknown":holder.get();
    }

    public static void set(String user){
        holder.set(user);

    }
}
